Comparing Three Files

Contents|Index|Previous|Next

Comparing Three Files

Use the program diff3 to compare three files and show any differences among them.

See A Third Sample Input File, Detailed Description of diff3 Normal Format, diff3 Hunks and An Example of diff3 Normal Format.

diff3 can also merge files; see Merging from a Common Ancestor).

The "normal" diff3 output format shows each hunk of differences without surrounding context. Hunks are labeled depending on whether they are two-way or three-way, and lines are annotated by their location in the input files.

See Invoking diff3 for more information on how to run diff3.